const Mock = require('mockjs');

const id = Mock.mock('@id');
//console.log('id:',id);

const obj = Mock.mock({
    id: '@id',
    name: '@cname',
    email: '@email',
    data: '@date',
    avatar: "@image('200x200','pink','#fff','avatar')",
    description: '@paragraph',
    url: '@url',
    ip: '@ip'
});

//console.log('obj:',obj);


// 自行拓展
Mock.Random.extend({
    cstore(){
        return this.pick([
            '应用商店',
            '水果店',
            '小吃店',
            '快餐店',
            '理发店'
        ]);
    }
});

console.log('cstore:',Mock.mock('@cstore'));